import 'package:safetymonitor/generated/json/base/json_convert_content.dart';
import 'package:safetymonitor/app/data/entities/home/tests_entity.dart';

TestsEntity $TestsEntityFromJson(Map<String, dynamic> json) {
  final TestsEntity testsEntity = TestsEntity();
  final int? code = jsonConvert.convert<int>(json['code']);
  if (code != null) {
    testsEntity.code = code;
  }
  final dynamic data = json['data'];
  if (data != null) {
    testsEntity.data = data;
  }
  final String? msg = jsonConvert.convert<String>(json['msg']);
  if (msg != null) {
    testsEntity.msg = msg;
  }
  return testsEntity;
}

Map<String, dynamic> $TestsEntityToJson(TestsEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['code'] = entity.code;
  data['data'] = entity.data;
  data['msg'] = entity.msg;
  return data;
}

extension TestsEntityExtension on TestsEntity {
  TestsEntity copyWith({
    int? code,
    dynamic data,
    String? msg,
  }) {
    return TestsEntity()
      ..code = code ?? this.code
      ..data = data ?? this.data
      ..msg = msg ?? this.msg;
  }
}